package bs

import scala.xml.NodeSeq
import net.liftweb._
import http._
import util._
import Helpers._


case class ButtonGroup(buttons: Button*) extends LiftComponent {
  private var _vertical = false

  def vertical = {
    _vertical = true
    this
  }

  override val template: NodeSeq = <div class="btn-group"><button></button></div>

  override def transformer = {
    import code.lib.ExtCssSel._
    "button" #> buttons.map(button => button.render) &?
      _vertical -> ".btn-group [class+]" #> "btn-group-vertical"
  }
}
